package com.huaxin.device.dto.enums.validation;

import com.huaxin.device.dto.enums.validator.AlarmTypeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = AlarmTypeValidator.class)
public @interface ValidAlarmType {
    String message() default "无效的报警类型，允许值：over_voltage/under_voltage/over_current/leakage_current/over_temperature/power_failure/frequency_deviation/poor_contact/arcing/disconnection/smoke/gas/water_leakage/tamper/manual_alarm";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}